package itcz.example.pattern.behavior_type.command.jdk_demo;

/**
 * @ClassName: Client
 * @Author: ITCZ
 * @Date: 2025-07-24
 * @Description:
 */
public class Client {
    public static void main(String[] args) {
        // 创建接收者
        Receiver receiver = new Receiver();
        // 创建命令对象
        TurnOffThread turnOffThread = new TurnOffThread(receiver);
        // Thread 调用者/请求者角色
        Thread thread = new Thread(turnOffThread);
        // 调用者发起命令
        thread.start();
    }
}
